<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Double-ended Queues</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
<link rel="start" href="index.html" title="GLib Reference Manual">
<link rel="up" href="glib-data-types.html" title="GLib Data Types">
<link rel="prev" href="glib-Singly-Linked-Lists.html" title="Singly-Linked Lists">
<link rel="next" href="glib-Sequences.html" title="Sequences">
<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="chapter" href="glib.html" title="GLib Overview">
<link rel="chapter" href="glib-fundamentals.html" title="GLib Fundamentals">
<link rel="chapter" href="glib-core.html" title="GLib Core Application Support">
<link rel="chapter" href="glib-utilities.html" title="GLib Utilities">
<link rel="chapter" href="glib-data-types.html" title="GLib Data Types">
<link rel="chapter" href="tools.html" title="GLib Tools">
<link rel="index" href="ix01.html" title="Index">
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
<link rel="index" href="ix03.html" title="Index of new symbols in 2.2">
<link rel="index" href="ix04.html" title="Index of new symbols in 2.4">
<link rel="index" href="ix05.html" title="Index of new symbols in 2.6">
<link rel="index" href="ix06.html" title="Index of new symbols in 2.8">
<link rel="index" href="ix07.html" title="Index of new symbols in 2.10">
<link rel="index" href="ix08.html" title="Index of new symbols in 2.12">
<link rel="index" href="ix09.html" title="Index of new symbols in 2.14">
<link rel="index" href="ix10.html" title="Index of new symbols in 2.16">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="glib-Singly-Linked-Lists.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="glib-data-types.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GLib Reference Manual</th>
<td><a accesskey="n" href="glib-Sequences.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id3316923" class="shortcut">Top</a>
                  &#160;|&#160;
                  <a href="#id3318084" class="shortcut">Description</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="glib-Double-ended-Queues"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2>
<a name="id3316923"></a><span class="refentrytitle">Double-ended Queues</span>
</h2>
<p>Double-ended Queues &#8212; double-ended queue data structure</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">

#include &lt;glib.h&gt;


                    <a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a>;
<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a>*             <a class="link" href="glib-Double-ended-Queues.html#g-queue-new">g_queue_new</a>                         (void);
void                <a class="link" href="glib-Double-ended-Queues.html#g-queue-free">g_queue_free</a>                        (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue);
#define             <a class="link" href="glib-Double-ended-Queues.html#G-QUEUE-INIT:CAPS">G_QUEUE_INIT</a>
void                <a class="link" href="glib-Double-ended-Queues.html#g-queue-init">g_queue_init</a>                        (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue);
void                <a class="link" href="glib-Double-ended-Queues.html#g-queue-clear">g_queue_clear</a>                       (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue);
<a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            <a class="link" href="glib-Double-ended-Queues.html#g-queue-is-empty">g_queue_is_empty</a>                    (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue);
<a class="link" href="glib-Basic-Types.html#guint">guint</a>               <a class="link" href="glib-Double-ended-Queues.html#g-queue-get-length">g_queue_get_length</a>                  (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue);
void                <a class="link" href="glib-Double-ended-Queues.html#g-queue-reverse">g_queue_reverse</a>                     (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue);
<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a>*             <a class="link" href="glib-Double-ended-Queues.html#g-queue-copy">g_queue_copy</a>                        (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue);
void                <a class="link" href="glib-Double-ended-Queues.html#g-queue-foreach">g_queue_foreach</a>                     (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GFunc">GFunc</a> func,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> user_data);
<a class="link" href="glib-Doubly-Linked-Lists.html#GList">GList</a>*              <a class="link" href="glib-Double-ended-Queues.html#g-queue-find">g_queue_find</a>                        (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> data);
<a class="link" href="glib-Doubly-Linked-Lists.html#GList">GList</a>*              <a class="link" href="glib-Double-ended-Queues.html#g-queue-find-custom">g_queue_find_custom</a>                 (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> data,
                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GCompareFunc">GCompareFunc</a> func);
void                <a class="link" href="glib-Double-ended-Queues.html#g-queue-sort">g_queue_sort</a>                        (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GCompareDataFunc">GCompareDataFunc</a> compare_func,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> user_data);
void                <a class="link" href="glib-Double-ended-Queues.html#g-queue-push-head">g_queue_push_head</a>                   (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> data);
void                <a class="link" href="glib-Double-ended-Queues.html#g-queue-push-tail">g_queue_push_tail</a>                   (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> data);
void                <a class="link" href="glib-Double-ended-Queues.html#g-queue-push-nth">g_queue_push_nth</a>                    (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> data,
                                                         <a class="link" href="glib-Basic-Types.html#gint">gint</a> n);
<a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a>            <a class="link" href="glib-Double-ended-Queues.html#g-queue-pop-head">g_queue_pop_head</a>                    (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue);
<a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a>            <a class="link" href="glib-Double-ended-Queues.html#g-queue-pop-tail">g_queue_pop_tail</a>                    (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue);
<a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a>            <a class="link" href="glib-Double-ended-Queues.html#g-queue-pop-nth">g_queue_pop_nth</a>                     (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Basic-Types.html#guint">guint</a> n);
<a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a>            <a class="link" href="glib-Double-ended-Queues.html#g-queue-peek-head">g_queue_peek_head</a>                   (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue);
<a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a>            <a class="link" href="glib-Double-ended-Queues.html#g-queue-peek-tail">g_queue_peek_tail</a>                   (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue);
<a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a>            <a class="link" href="glib-Double-ended-Queues.html#g-queue-peek-nth">g_queue_peek_nth</a>                    (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Basic-Types.html#guint">guint</a> n);
<a class="link" href="glib-Basic-Types.html#gint">gint</a>                <a class="link" href="glib-Double-ended-Queues.html#g-queue-index">g_queue_index</a>                       (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> data);
void                <a class="link" href="glib-Double-ended-Queues.html#g-queue-remove">g_queue_remove</a>                      (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> data);
void                <a class="link" href="glib-Double-ended-Queues.html#g-queue-remove-all">g_queue_remove_all</a>                  (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> data);
void                <a class="link" href="glib-Double-ended-Queues.html#g-queue-insert-before">g_queue_insert_before</a>               (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GList">GList</a> *sibling,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> data);
void                <a class="link" href="glib-Double-ended-Queues.html#g-queue-insert-after">g_queue_insert_after</a>                (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GList">GList</a> *sibling,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> data);
void                <a class="link" href="glib-Double-ended-Queues.html#g-queue-insert-sorted">g_queue_insert_sorted</a>               (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> data,
                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GCompareDataFunc">GCompareDataFunc</a> func,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> user_data);
void                <a class="link" href="glib-Double-ended-Queues.html#g-queue-push-head-link">g_queue_push_head_link</a>              (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GList">GList</a> *link_);
void                <a class="link" href="glib-Double-ended-Queues.html#g-queue-push-tail-link">g_queue_push_tail_link</a>              (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GList">GList</a> *link_);
void                <a class="link" href="glib-Double-ended-Queues.html#g-queue-push-nth-link">g_queue_push_nth_link</a>               (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Basic-Types.html#gint">gint</a> n,
                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GList">GList</a> *link_);
<a class="link" href="glib-Doubly-Linked-Lists.html#GList">GList</a>*              <a class="link" href="glib-Double-ended-Queues.html#g-queue-pop-head-link">g_queue_pop_head_link</a>               (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue);
<a class="link" href="glib-Doubly-Linked-Lists.html#GList">GList</a>*              <a class="link" href="glib-Double-ended-Queues.html#g-queue-pop-tail-link">g_queue_pop_tail_link</a>               (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue);
<a class="link" href="glib-Doubly-Linked-Lists.html#GList">GList</a>*              <a class="link" href="glib-Double-ended-Queues.html#g-queue-pop-nth-link">g_queue_pop_nth_link</a>                (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Basic-Types.html#guint">guint</a> n);
<a class="link" href="glib-Doubly-Linked-Lists.html#GList">GList</a>*              <a class="link" href="glib-Double-ended-Queues.html#g-queue-peek-head-link">g_queue_peek_head_link</a>              (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue);
<a class="link" href="glib-Doubly-Linked-Lists.html#GList">GList</a>*              <a class="link" href="glib-Double-ended-Queues.html#g-queue-peek-tail-link">g_queue_peek_tail_link</a>              (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue);
<a class="link" href="glib-Doubly-Linked-Lists.html#GList">GList</a>*              <a class="link" href="glib-Double-ended-Queues.html#g-queue-peek-nth-link">g_queue_peek_nth_link</a>               (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Basic-Types.html#guint">guint</a> n);
<a class="link" href="glib-Basic-Types.html#gint">gint</a>                <a class="link" href="glib-Double-ended-Queues.html#g-queue-link-index">g_queue_link_index</a>                  (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GList">GList</a> *link_);
void                <a class="link" href="glib-Double-ended-Queues.html#g-queue-unlink">g_queue_unlink</a>                      (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GList">GList</a> *link_);
void                <a class="link" href="glib-Double-ended-Queues.html#g-queue-delete-link">g_queue_delete_link</a>                 (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GList">GList</a> *link_);
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id3318084"></a><h2>Description</h2>
<p>
The <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a> structure and its associated functions provide a standard
queue data structure. Internally, <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a> uses the same data structure as 
<a class="link" href="glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> to store elements.  
</p>
<p>
The data contained in each element can be either integer values, by using one
of the
<a class="link" href="glib-Type-Conversion-Macros.html" title="Type Conversion Macros">Type Conversion Macros</a>,
or simply pointers to any type of data.
</p>
<p>
To create a new <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>, use <a class="link" href="glib-Double-ended-Queues.html#g-queue-new"><code class="function">g_queue_new()</code></a>.
</p>
<p>
To initialize a statically-allocated <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>, use <a class="link" href="glib-Double-ended-Queues.html#G-QUEUE-INIT:CAPS"><span class="type">G_QUEUE_INIT</span></a> or
<a class="link" href="glib-Double-ended-Queues.html#g-queue-init"><code class="function">g_queue_init()</code></a>.
</p>
<p>
To add elements, use <a class="link" href="glib-Double-ended-Queues.html#g-queue-push-head"><code class="function">g_queue_push_head()</code></a>, <a class="link" href="glib-Double-ended-Queues.html#g-queue-push-head-link"><code class="function">g_queue_push_head_link()</code></a>, 
<a class="link" href="glib-Double-ended-Queues.html#g-queue-push-tail"><code class="function">g_queue_push_tail()</code></a> and <a class="link" href="glib-Double-ended-Queues.html#g-queue-push-tail-link"><code class="function">g_queue_push_tail_link()</code></a>.
</p>
<p>
To remove elements, use <a class="link" href="glib-Double-ended-Queues.html#g-queue-pop-head"><code class="function">g_queue_pop_head()</code></a> and <a class="link" href="glib-Double-ended-Queues.html#g-queue-pop-tail"><code class="function">g_queue_pop_tail()</code></a>.
</p>
<p>
To free the entire queue, use <a class="link" href="glib-Double-ended-Queues.html#g-queue-free"><code class="function">g_queue_free()</code></a>.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id3318276"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id3318286"></a><h3>
<a name="GQueue"></a>GQueue</h3>
<a class="indexterm" name="id3318298"></a><pre class="programlisting">typedef struct {
  GList *head;
  GList *tail;
  guint  length;
} GQueue;
</pre>
<p>
Contains the public fields of a Queue.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a class="link" href="glib-Doubly-Linked-Lists.html#GList">GList</a>&#160;*<em class="structfield"><code>head</code></em>;</span></p></td>
<td>a pointer to the first element of the queue.
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="glib-Doubly-Linked-Lists.html#GList">GList</a>&#160;*<em class="structfield"><code>tail</code></em>;</span></p></td>
<td>a pointer to the last element of the queue.
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="glib-Basic-Types.html#guint">guint</a>&#160;<em class="structfield"><code>length</code></em>;</span></p></td>
<td>the number of elements in the queue.

</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3318390"></a><h3>
<a name="g-queue-new"></a>g_queue_new ()</h3>
<a class="indexterm" name="id3318402"></a><pre class="programlisting"><a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a>*             g_queue_new                         (void);</pre>
<p>
Creates a new <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> a new <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3318457"></a><h3>
<a name="g-queue-free"></a>g_queue_free ()</h3>
<a class="indexterm" name="id3318470"></a><pre class="programlisting">void                g_queue_free                        (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue);</pre>
<p>
Frees the memory allocated for the <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>. Only call this function if
<em class="parameter"><code>queue</code></em> was created with <a class="link" href="glib-Double-ended-Queues.html#g-queue-new"><code class="function">g_queue_new()</code></a>. If queue elements contain
dynamically-allocated memory, they should be freed first.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3318554"></a><h3>
<a name="G-QUEUE-INIT:CAPS"></a>G_QUEUE_INIT</h3>
<a class="indexterm" name="id3318569"></a><pre class="programlisting">#define G_QUEUE_INIT { NULL, NULL, 0 }
</pre>
<p>
A statically-allocated <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a> must be initialized with this macro before it
can be used.  This macro can be used to initialize a variable, but it cannot
be assigned to a variable.  In that case you have to use <a class="link" href="glib-Double-ended-Queues.html#g-queue-init"><code class="function">g_queue_init()</code></a>.
</p>
<div class="informalexample"><pre class="programlisting">
GQueue my_queue = G_QUEUE_INIT;
</pre></div>
<p class="since">Since 2.14


</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3318623"></a><h3>
<a name="g-queue-init"></a>g_queue_init ()</h3>
<a class="indexterm" name="id3318638"></a><pre class="programlisting">void                g_queue_init                        (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue);</pre>
<p>
A statically-allocated <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a> must be initialized with this function
before it can be used. Alternatively you can initialize it with
<a class="link" href="glib-Double-ended-Queues.html#G-QUEUE-INIT:CAPS"><span class="type">G_QUEUE_INIT</span></a>. It is not necessary to initialize queues created with
<a class="link" href="glib-Double-ended-Queues.html#g-queue-new"><code class="function">g_queue_new()</code></a>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></p></td>
<td> an uninitialized <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>
</td>
</tr></tbody>
</table></div>
<p class="since">Since  2.14
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3318732"></a><h3>
<a name="g-queue-clear"></a>g_queue_clear ()</h3>
<a class="indexterm" name="id3318747"></a><pre class="programlisting">void                g_queue_clear                       (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue);</pre>
<p>
Removes all the elements in <em class="parameter"><code>queue</code></em>. If queue elements contain
dynamically-allocated memory, they should be freed first.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>
</td>
</tr></tbody>
</table></div>
<p class="since">Since  2.14
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3318819"></a><h3>
<a name="g-queue-is-empty"></a>g_queue_is_empty ()</h3>
<a class="indexterm" name="id3318832"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            g_queue_is_empty                    (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue);</pre>
<p>
Returns <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the queue is empty.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the queue is empty.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3318921"></a><h3>
<a name="g-queue-get-length"></a>g_queue_get_length ()</h3>
<a class="indexterm" name="id3318936"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#guint">guint</a>               g_queue_get_length                  (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue);</pre>
<p>
Returns the number of items in <em class="parameter"><code>queue</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> The number of items in <em class="parameter"><code>queue</code></em>.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3319022"></a><h3>
<a name="g-queue-reverse"></a>g_queue_reverse ()</h3>
<a class="indexterm" name="id3319038"></a><pre class="programlisting">void                g_queue_reverse                     (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue);</pre>
<p>
Reverses the order of the items in <em class="parameter"><code>queue</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>
</td>
</tr></tbody>
</table></div>
<p class="since">Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3319108"></a><h3>
<a name="g-queue-copy"></a>g_queue_copy ()</h3>
<a class="indexterm" name="id3319123"></a><pre class="programlisting"><a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a>*             g_queue_copy                        (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue);</pre>
<p>
Copies a <em class="parameter"><code>queue</code></em>. Note that is a shallow copy. If the elements in the
queue consist of pointers to data, the pointers are copied, but the
actual data is not.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> A copy of <em class="parameter"><code>queue</code></em>

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3319211"></a><h3>
<a name="g-queue-foreach"></a>g_queue_foreach ()</h3>
<a class="indexterm" name="id3319226"></a><pre class="programlisting">void                g_queue_foreach                     (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GFunc">GFunc</a> func,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> user_data);</pre>
<p>
Calls <em class="parameter"><code>func</code></em> for each element in the queue passing <em class="parameter"><code>user_data</code></em> to the
function.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>func</code></em>&#160;:</span></p></td>
<td> the function to call for each element's data
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></p></td>
<td> user data to pass to <em class="parameter"><code>func</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3319353"></a><h3>
<a name="g-queue-find"></a>g_queue_find ()</h3>
<a class="indexterm" name="id3319368"></a><pre class="programlisting"><a class="link" href="glib-Doubly-Linked-Lists.html#GList">GList</a>*              g_queue_find                        (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> data);</pre>
<p>
Finds the first link in <em class="parameter"><code>queue</code></em> which contains <em class="parameter"><code>data</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></p></td>
<td> data to find
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> The first link in <em class="parameter"><code>queue</code></em> which contains <em class="parameter"><code>data</code></em>.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3319489"></a><h3>
<a name="g-queue-find-custom"></a>g_queue_find_custom ()</h3>
<a class="indexterm" name="id3319504"></a><pre class="programlisting"><a class="link" href="glib-Doubly-Linked-Lists.html#GList">GList</a>*              g_queue_find_custom                 (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> data,
                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GCompareFunc">GCompareFunc</a> func);</pre>
<p>
Finds an element in a <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>, using a supplied function to find the
desired element. It iterates over the queue, calling the given function
which should return 0 when the desired element is found. The function
takes two gconstpointer arguments, the <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a> element's data as the
first argument and the given user data as the second argument.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></p></td>
<td> user data passed to <em class="parameter"><code>func</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>func</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Doubly-Linked-Lists.html#GCompareFunc"><span class="type">GCompareFunc</span></a> to call for each element. It should return 0
when the desired element is found
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> The found link, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if it wasn't found

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3319670"></a><h3>
<a name="g-queue-sort"></a>g_queue_sort ()</h3>
<a class="indexterm" name="id3319685"></a><pre class="programlisting">void                g_queue_sort                        (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GCompareDataFunc">GCompareDataFunc</a> compare_func,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> user_data);</pre>
<p>
Sorts <em class="parameter"><code>queue</code></em> using <em class="parameter"><code>compare_func</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>compare_func</code></em>&#160;:</span></p></td>
<td> the <a class="link" href="glib-Doubly-Linked-Lists.html#GCompareDataFunc"><span class="type">GCompareDataFunc</span></a> used to sort <em class="parameter"><code>queue</code></em>. This function
    is passed two elements of the queue and should return 0 if they are
    equal, a negative value if the first comes before the second, and
    a positive value if the second comes before the first.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></p></td>
<td> user data passed to <em class="parameter"><code>compare_func</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3319829"></a><h3>
<a name="g-queue-push-head"></a>g_queue_push_head ()</h3>
<a class="indexterm" name="id3319842"></a><pre class="programlisting">void                g_queue_push_head                   (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> data);</pre>
<p>
Adds a new element at the head of the queue.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></p></td>
<td> the data for the new element.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3319922"></a><h3>
<a name="g-queue-push-tail"></a>g_queue_push_tail ()</h3>
<a class="indexterm" name="id3319935"></a><pre class="programlisting">void                g_queue_push_tail                   (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> data);</pre>
<p>
Adds a new element at the tail of the queue.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></p></td>
<td> the data for the new element.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3320015"></a><h3>
<a name="g-queue-push-nth"></a>g_queue_push_nth ()</h3>
<a class="indexterm" name="id3320030"></a><pre class="programlisting">void                g_queue_push_nth                    (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> data,
                                                         <a class="link" href="glib-Basic-Types.html#gint">gint</a> n);</pre>
<p>
Inserts a new element into <em class="parameter"><code>queue</code></em> at the given position</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></p></td>
<td> the data for the new element
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n</code></em>&#160;:</span></p></td>
<td> the position to insert the new element. If <em class="parameter"><code>n</code></em> is negative or
    larger than the number of elements in the <em class="parameter"><code>queue</code></em>, the element is
    added to the end of the queue.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3320158"></a><h3>
<a name="g-queue-pop-head"></a>g_queue_pop_head ()</h3>
<a class="indexterm" name="id3320171"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a>            g_queue_pop_head                    (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue);</pre>
<p>
Removes the first element of the queue.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> the data of the first element in the queue, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the queue
  is empty.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3320251"></a><h3>
<a name="g-queue-pop-tail"></a>g_queue_pop_tail ()</h3>
<a class="indexterm" name="id3320263"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a>            g_queue_pop_tail                    (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue);</pre>
<p>
Removes the last element of the queue.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> the data of the last element in the queue, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the queue
  is empty.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3320342"></a><h3>
<a name="g-queue-pop-nth"></a>g_queue_pop_nth ()</h3>
<a class="indexterm" name="id3320357"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a>            g_queue_pop_nth                     (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Basic-Types.html#guint">guint</a> n);</pre>
<p>
Removes the <em class="parameter"><code>n</code></em>'th element of <em class="parameter"><code>queue</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n</code></em>&#160;:</span></p></td>
<td> the position of the element.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> the element's data, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>n</code></em> is off the end of <em class="parameter"><code>queue</code></em>.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3320487"></a><h3>
<a name="g-queue-peek-head"></a>g_queue_peek_head ()</h3>
<a class="indexterm" name="id3320500"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a>            g_queue_peek_head                   (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue);</pre>
<p>
Returns the first element of the queue.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> the data of the first element in the queue, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the queue
  is empty.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3320579"></a><h3>
<a name="g-queue-peek-tail"></a>g_queue_peek_tail ()</h3>
<a class="indexterm" name="id3320592"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a>            g_queue_peek_tail                   (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue);</pre>
<p>
Returns the last element of the queue.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> the data of the last element in the queue, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the queue
  is empty.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3320671"></a><h3>
<a name="g-queue-peek-nth"></a>g_queue_peek_nth ()</h3>
<a class="indexterm" name="id3320686"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a>            g_queue_peek_nth                    (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Basic-Types.html#guint">guint</a> n);</pre>
<p>
Returns the <em class="parameter"><code>n</code></em>'th element of <em class="parameter"><code>queue</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n</code></em>&#160;:</span></p></td>
<td> the position of the element.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> The data for the <em class="parameter"><code>n</code></em>'th element of <em class="parameter"><code>queue</code></em>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>n</code></em> is
  off the end of <em class="parameter"><code>queue</code></em>.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3320828"></a><h3>
<a name="g-queue-index"></a>g_queue_index ()</h3>
<a class="indexterm" name="id3320842"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint">gint</a>                g_queue_index                       (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> data);</pre>
<p>
Returns the position of the first element in <em class="parameter"><code>queue</code></em> which contains <em class="parameter"><code>data</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></p></td>
<td> the data to find.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> The position of the first element in <em class="parameter"><code>queue</code></em> which contains <em class="parameter"><code>data</code></em>, or -1 if no element in <em class="parameter"><code>queue</code></em> contains <em class="parameter"><code>data</code></em>.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3320976"></a><h3>
<a name="g-queue-remove"></a>g_queue_remove ()</h3>
<a class="indexterm" name="id3320991"></a><pre class="programlisting">void                g_queue_remove                      (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> data);</pre>
<p>
Removes the first element in <em class="parameter"><code>queue</code></em> that contains <em class="parameter"><code>data</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></p></td>
<td> data to remove.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3321089"></a><h3>
<a name="g-queue-remove-all"></a>g_queue_remove_all ()</h3>
<a class="indexterm" name="id3321105"></a><pre class="programlisting">void                g_queue_remove_all                  (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> data);</pre>
<p>
Remove all elemeents in <em class="parameter"><code>queue</code></em> which contains <em class="parameter"><code>data</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></p></td>
<td> data to remove
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3321203"></a><h3>
<a name="g-queue-insert-before"></a>g_queue_insert_before ()</h3>
<a class="indexterm" name="id3321218"></a><pre class="programlisting">void                g_queue_insert_before               (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GList">GList</a> *sibling,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> data);</pre>
<p>
Inserts <em class="parameter"><code>data</code></em> into <em class="parameter"><code>queue</code></em> before <em class="parameter"><code>sibling</code></em>.
</p>
<p>
<em class="parameter"><code>sibling</code></em> must be part of <em class="parameter"><code>queue</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>sibling</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> link that <span class="emphasis"><em>must</em></span> be part of <em class="parameter"><code>queue</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></p></td>
<td> the data to insert
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3321376"></a><h3>
<a name="g-queue-insert-after"></a>g_queue_insert_after ()</h3>
<a class="indexterm" name="id3321392"></a><pre class="programlisting">void                g_queue_insert_after                (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GList">GList</a> *sibling,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> data);</pre>
<p>
Inserts <em class="parameter"><code>data</code></em> into <em class="parameter"><code>queue</code></em> after <em class="parameter"><code>sibling</code></em>
</p>
<p>
<em class="parameter"><code>sibling</code></em> must be part of <em class="parameter"><code>queue</code></em></p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>sibling</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> link that <span class="emphasis"><em>must</em></span> be part of <em class="parameter"><code>queue</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></p></td>
<td> the data to insert
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3321548"></a><h3>
<a name="g-queue-insert-sorted"></a>g_queue_insert_sorted ()</h3>
<a class="indexterm" name="id3321564"></a><pre class="programlisting">void                g_queue_insert_sorted               (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> data,
                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GCompareDataFunc">GCompareDataFunc</a> func,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> user_data);</pre>
<p>
Inserts <em class="parameter"><code>data</code></em> into <em class="parameter"><code>queue</code></em> using <em class="parameter"><code>func</code></em> to determine the new position.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></p></td>
<td> the data to insert
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>func</code></em>&#160;:</span></p></td>
<td> the <a class="link" href="glib-Doubly-Linked-Lists.html#GCompareDataFunc"><span class="type">GCompareDataFunc</span></a> used to compare elements in the queue. It is
    called with two elements of the <em class="parameter"><code>queue</code></em> and <em class="parameter"><code>user_data</code></em>. It should
    return 0 if the elements are equal, a negative value if the first
    element comes before the second, and a positive value if the second
    element comes before the first.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></p></td>
<td> user data passed to <em class="parameter"><code>func</code></em>.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3321743"></a><h3>
<a name="g-queue-push-head-link"></a>g_queue_push_head_link ()</h3>
<a class="indexterm" name="id3321756"></a><pre class="programlisting">void                g_queue_push_head_link              (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GList">GList</a> *link_);</pre>
<p>
Adds a new element at the head of the queue.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>link_</code></em>&#160;:</span></p></td>
<td> a single <a class="link" href="glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> element, <span class="emphasis"><em>not</em></span> a list with
    more than one element.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3321847"></a><h3>
<a name="g-queue-push-tail-link"></a>g_queue_push_tail_link ()</h3>
<a class="indexterm" name="id3321861"></a><pre class="programlisting">void                g_queue_push_tail_link              (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GList">GList</a> *link_);</pre>
<p>
Adds a new element at the tail of the queue.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>link_</code></em>&#160;:</span></p></td>
<td> a single <a class="link" href="glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> element, <span class="emphasis"><em>not</em></span> a list with
  more than one element.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3321952"></a><h3>
<a name="g-queue-push-nth-link"></a>g_queue_push_nth_link ()</h3>
<a class="indexterm" name="id3321968"></a><pre class="programlisting">void                g_queue_push_nth_link               (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Basic-Types.html#gint">gint</a> n,
                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GList">GList</a> *link_);</pre>
<p>
Inserts <em class="parameter"><code>link</code></em> into <em class="parameter"><code>queue</code></em> at the given position.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n</code></em>&#160;:</span></p></td>
<td> the position to insert the link. If this is negative or larger than
    the number of elements in <em class="parameter"><code>queue</code></em>, the link is added to the end of
    <em class="parameter"><code>queue</code></em>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>link_</code></em>&#160;:</span></p></td>
<td> the link to add to <em class="parameter"><code>queue</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3322107"></a><h3>
<a name="g-queue-pop-head-link"></a>g_queue_pop_head_link ()</h3>
<a class="indexterm" name="id3322120"></a><pre class="programlisting"><a class="link" href="glib-Doubly-Linked-Lists.html#GList">GList</a>*              g_queue_pop_head_link               (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue);</pre>
<p>
Removes the first element of the queue.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> the <a class="link" href="glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> element at the head of the queue, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the queue
  is empty.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3322207"></a><h3>
<a name="g-queue-pop-tail-link"></a>g_queue_pop_tail_link ()</h3>
<a class="indexterm" name="id3322220"></a><pre class="programlisting"><a class="link" href="glib-Doubly-Linked-Lists.html#GList">GList</a>*              g_queue_pop_tail_link               (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue);</pre>
<p>
Removes the last element of the queue.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> the <a class="link" href="glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> element at the tail of the queue, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the queue
  is empty.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3322308"></a><h3>
<a name="g-queue-pop-nth-link"></a>g_queue_pop_nth_link ()</h3>
<a class="indexterm" name="id3322323"></a><pre class="programlisting"><a class="link" href="glib-Doubly-Linked-Lists.html#GList">GList</a>*              g_queue_pop_nth_link                (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Basic-Types.html#guint">guint</a> n);</pre>
<p>
Removes and returns the link at the given position.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n</code></em>&#160;:</span></p></td>
<td> the link's position
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> The <em class="parameter"><code>n</code></em>'th link, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>n</code></em> is off the end of <em class="parameter"><code>queue</code></em>.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3322448"></a><h3>
<a name="g-queue-peek-head-link"></a>g_queue_peek_head_link ()</h3>
<a class="indexterm" name="id3322463"></a><pre class="programlisting"><a class="link" href="glib-Doubly-Linked-Lists.html#GList">GList</a>*              g_queue_peek_head_link              (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue);</pre>
<p>
Returns the first link in <em class="parameter"><code>queue</code></em></p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> the first link in <em class="parameter"><code>queue</code></em>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>queue</code></em> is empty

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3322565"></a><h3>
<a name="g-queue-peek-tail-link"></a>g_queue_peek_tail_link ()</h3>
<a class="indexterm" name="id3322580"></a><pre class="programlisting"><a class="link" href="glib-Doubly-Linked-Lists.html#GList">GList</a>*              g_queue_peek_tail_link              (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue);</pre>
<p>
Returns the last link <em class="parameter"><code>queue</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> the last link in <em class="parameter"><code>queue</code></em>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>queue</code></em> is empty

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3322683"></a><h3>
<a name="g-queue-peek-nth-link"></a>g_queue_peek_nth_link ()</h3>
<a class="indexterm" name="id3322699"></a><pre class="programlisting"><a class="link" href="glib-Doubly-Linked-Lists.html#GList">GList</a>*              g_queue_peek_nth_link               (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Basic-Types.html#guint">guint</a> n);</pre>
<p>
Returns the link at the given position</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n</code></em>&#160;:</span></p></td>
<td> the position of the link
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> The link at the <em class="parameter"><code>n</code></em>'th position, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>n</code></em> is off the
end of the list

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3322818"></a><h3>
<a name="g-queue-link-index"></a>g_queue_link_index ()</h3>
<a class="indexterm" name="id3322834"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint">gint</a>                g_queue_link_index                  (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GList">GList</a> *link_);</pre>
<p>
Returns the position of <em class="parameter"><code>link_</code></em> in <em class="parameter"><code>queue</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></p></td>
<td> a <span class="type">Gqueue</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>link_</code></em>&#160;:</span></p></td>
<td> A <a class="link" href="glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> link
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> The position of <em class="parameter"><code>link_</code></em>, or -1 if the link is
not part of <em class="parameter"><code>queue</code></em>

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3322962"></a><h3>
<a name="g-queue-unlink"></a>g_queue_unlink ()</h3>
<a class="indexterm" name="id3322978"></a><pre class="programlisting">void                g_queue_unlink                      (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GList">GList</a> *link_);</pre>
<p>
Unlinks <em class="parameter"><code>link_</code></em> so that it will no longer be part of <em class="parameter"><code>queue</code></em>. The link is
not freed.
</p>
<p>
<em class="parameter"><code>link_</code></em> must be part of <em class="parameter"><code>queue</code></em>,</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>link_</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> link that <span class="emphasis"><em>must</em></span> be part of <em class="parameter"><code>queue</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3323108"></a><h3>
<a name="g-queue-delete-link"></a>g_queue_delete_link ()</h3>
<a class="indexterm" name="id3323124"></a><pre class="programlisting">void                g_queue_delete_link                 (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,
                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GList">GList</a> *link_);</pre>
<p>
Removes <em class="parameter"><code>link_</code></em> from <em class="parameter"><code>queue</code></em> and frees it.
</p>
<p>
<em class="parameter"><code>link_</code></em> must be part of <em class="parameter"><code>queue</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>link_</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> link that <span class="emphasis"><em>must</em></span> be part of <em class="parameter"><code>queue</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.4
</p>
</div>
</div>
<div class="refsect1" lang="en">
<a name="id3323254"></a><div class="refsect2" lang="en"><a name="id3323255"></a></div>
<hr>
<div class="refsect2" lang="en"><a name="id3323256"></a></div>
</div>
</div>
</body>
</html>
